module.exports = {
  description: 'generate vue3 component',
  prompts: [
    {
      type: 'input',
      name: 'name',
      message: 'please input component name'
    },
    {
      type: 'input',
      name: 'mode',
      message: 'please input component style: s? // 单文件'
    },
  ],
  actions: ({ name, mode }) => {
    // s ==> 代表单文件
    const pathPart = mode === 's' ? '': '/index'
    const res = [
      {
        type: 'add',
        path: `src/views/new-flow-process/components/{{titleCase name}}${pathPart}.vue`,
        templateFile: 'plop-template/vue3-component/template/component.hbs'
      }
    ]
    return res
  } 
}